// ============================================================================
//
// LCP-net framework by Pierre CHATEL chatelp@gmail.com
// Distributed under GPLv3
// Copyright (C) THALES Land & Joint Systems, 2008, 2009. All rights reserved
//
// ============================================================================

/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package com.thalesgroup.preferenceFramework.models;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EObject;

/**
 * <!-- begin-user-doc --> A representation of the model object '
 * <em><b>Preference Network</b></em>'. <!-- end-user-doc -->
 *
 * <p>
 * The following features are supported:
 * <ul>
 *   <li>{@link com.thalesgroup.preferenceFramework.models.PreferenceNetwork#getNodes <em>Nodes</em>}</li>
 *   <li>{@link com.thalesgroup.preferenceFramework.models.PreferenceNetwork#getArcs <em>Arcs</em>}</li>
 *   <li>{@link com.thalesgroup.preferenceFramework.models.PreferenceNetwork#getOutcomes <em>Outcomes</em>}</li>
 * </ul>
 * </p>
 *
 * @see com.thalesgroup.preferenceFramework.models.ModelsPackage#getPreferenceNetwork()
 * @model abstract="true"
 * @generated
 */
public interface PreferenceNetwork extends Namable {
	/**
	 * Returns the value of the '<em><b>Nodes</b></em>' containment reference list.
	 * The list contents are of type {@link com.thalesgroup.preferenceFramework.models.Node}.
	 * It is bidirectional and its opposite is '{@link com.thalesgroup.preferenceFramework.models.Node#getPreferenceNetwork <em>Preference Network</em>}'.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Nodes</em>' containment reference list isn't
	 * clear, there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Nodes</em>' containment reference list.
	 * @see com.thalesgroup.preferenceFramework.models.ModelsPackage#getPreferenceNetwork_Nodes()
	 * @see com.thalesgroup.preferenceFramework.models.Node#getPreferenceNetwork
	 * @model opposite="preferenceNetwork" containment="true" required="true"
	 * @generated
	 */
	EList<Node> getNodes();

	/**
	 * Returns the value of the '<em><b>Arcs</b></em>' containment reference list.
	 * The list contents are of type {@link com.thalesgroup.preferenceFramework.models.Arc}.
	 * It is bidirectional and its opposite is '{@link com.thalesgroup.preferenceFramework.models.Arc#getPreferenceNetwork <em>Preference Network</em>}'.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Arcs</em>' containment reference list isn't
	 * clear, there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Arcs</em>' containment reference list.
	 * @see com.thalesgroup.preferenceFramework.models.ModelsPackage#getPreferenceNetwork_Arcs()
	 * @see com.thalesgroup.preferenceFramework.models.Arc#getPreferenceNetwork
	 * @model opposite="preferenceNetwork" containment="true"
	 * @generated
	 */
	EList<Arc> getArcs();

	/**
	 * Returns the value of the '<em><b>Outcomes</b></em>' containment reference list.
	 * The list contents are of type {@link com.thalesgroup.preferenceFramework.models.Outcome}.
	 * It is bidirectional and its opposite is '{@link com.thalesgroup.preferenceFramework.models.Outcome#getPreferenceNetwork <em>Preference Network</em>}'.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Outcomes</em>' containment reference list
	 * isn't clear, there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Outcomes</em>' containment reference list.
	 * @see com.thalesgroup.preferenceFramework.models.ModelsPackage#getPreferenceNetwork_Outcomes()
	 * @see com.thalesgroup.preferenceFramework.models.Outcome#getPreferenceNetwork
	 * @model opposite="preferenceNetwork" containment="true"
	 * @generated
	 */
	EList<Outcome> getOutcomes();

	/**
	 * Given the list of outcomes already assigned to this preference network,
	 * returns the list of best outcomes. All outcomes in this list share the
	 * exact same utility value.
	 * 
	 * @return the list of best outcomes.
	 * @model kind="operation"
	 * @generated NOT
	 */
	EList<Outcome> getBestOutcomes();

	/**
	 * Orders the list of outcomes and returns it. Outcomes with higher utility
	 * come first.
	 * 
	 * Side effect: outcomes from this preference network are also ordered
	 * internally.
	 * 
	 * @model
	 * @generated NOT
	 */
	EList<Outcome> orderOutcomes();

	/**
	 * Given all possible outcomes of this preference model, returns the list of
	 * optimal outcomes.
	 * 
	 * Optimal outcomes share the exact same utility value.
	 * 
	 * @param constraints
	 *            fixed node values as constraints to these outcomes (empty list
	 *            if no constraints)
	 * @return the list of optimal outcomes given the constraints
	 * @model constraintsMany="true"
	 * @generated NOT
	 */
	EList<Outcome> getOptimalOutcomes(EList<NodeValue> constraints);

	/**
	 * Return the node named "nodeName" in model, or null if no node with this
	 * name.
	 * 
	 * @param nodeName
	 *            the node name
	 * @return a node named "nodeName", or null
	 * @model nodeNameRequired="true"
	 * @generated NOT
	 */
	Node getNode(String nodeName);

	/**
	 * Return names of all the nodes in the preference model.
	 * 
	 * @model kind="operation" required="true"
	 * @generated NOT
	 */
	EList<String> getNodesNames();

} // PreferenceNetwork
